import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }
//添加数据
export function addData(data) {
    return request({
        url: getUrl("contract/addData"),
        method: 'post',
        data
    })
}

//更新数据
export function updateData(data) {
    return request({
        url: getUrl("contract/updateData"),
        method: 'post',
        data
    })
}

export function createTask(data) {
    return request({
        url: getUrl("contract/createTask"),
        method: 'post',
        data
    })
}

export function deleteData(data) {
    return request({
        url: getUrl("contract/" + data),
        method: 'delete'
    })
}


//获取数据
export function getData(data) {
    return request({
        url: getUrl("contract/getData"),
        method: 'post',
        data
    })
}

export function getDataList(data) {
    return request({
        url: getUrl("contract/getList"),
        method: 'post',
        data
    })
}
